package com.lx.regex;

import java.util.Calendar;

public class Clanderdemo {
    public static void main(String[] args) {
        Calendar c = Calendar.getInstance();
        System.out.println(c);
        int year = c.get(Calendar.YEAR);
        //0表示一月
        int month = c.get(Calendar.MONTH);

        int week = c.get(Calendar.WEEK_OF_YEAR);
        System.out.println(year+","+month+","+week);
        c.set(Calendar.MONTH,10);
        c.add(Calendar.YEAR,1);
        System.out.println(c.get(Calendar.MONTH)+","+c.get(Calendar.YEAR));
    }
}
